package com.crm.redis.service.returnMoneyManager;

import com.crm.model.vo.returnMoney.ReturnMoneyRedisVO;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author:chaifuyou
 * @Date: 2021/8/12 9:49
 */
public interface ReturnMoneyRedisService {

    /**
     * 业绩、到款金额存redis
     * @param companyId
     * @param gradeMoney
     * @param returnMoney
     * @param arriveTime
     */
    void returnMoneyToRedis(String companyId, BigDecimal gradeMoney, BigDecimal returnMoney, Date arriveTime);

    /**
     * 修改回款金额。业绩金额
     * @param gradeMoney 业绩金额
     * @param companyId 公司id
     * @param arriveMoney 到款金额
     * @param arriveTime 到款时间
     * @param oldArriveMoney 原来的到款金额
     * @param oldArriveTime 原来的到款时间
     */
    void updateReturnMoneyToRedis(BigDecimal gradeMoney, String companyId, BigDecimal arriveMoney, Date arriveTime, BigDecimal oldArriveMoney, Date oldArriveTime);

    /**
     * 删除业绩金额提成金额
     * @param arriveTime
     * @param companyId
     * @param arriveMoney
     * @param gradeMoney
     */
    void delReturnMoney(Date arriveTime, String companyId, BigDecimal arriveMoney, BigDecimal gradeMoney);

    /**
     * 获取回款、业绩List
     * @param companyId
     * @param thisDate
     * @return
     */
    List<ReturnMoneyRedisVO> getRedisReturnMoney(String companyId, Date thisDate);
}
